package com.example.everying.model.entity.pay;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
 * @program: everything
 * @description: 转账批次表
 * @author: szy
 * @create: 2025-05-14 16:45
 **/
@Data
@TableName("transfer_batch")
public class TransferBatchEntity implements Serializable {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "主键ID")
    private Long id;

    @NotBlank(message = "用户ID不能为空")
    @ApiModelProperty(value = "用户ID")
    private String userId;

    @NotNull(message = "支付渠道ID不能为空")
    @ApiModelProperty(value = "支付渠道ID")
    private Integer channelId;

    @NotBlank(message = "平台批次单号不能为空")
    @ApiModelProperty(value = "平台批次单号")
    private String batchNo;

    @ApiModelProperty(value = "渠道批次单号")
    private String channelBatchNo;

    @NotBlank(message = "应用ID不能为空")
    @ApiModelProperty(value = "应用ID")
    private String openId;

    @ApiModelProperty(value = "批次备注")
    private String batchRemark;

    @NotBlank(message = "批次类型不能为空")
    @ApiModelProperty(value = "批次类型(TRANSFER:转账,REFUND:退款)")
    private String batchType;

    @NotBlank(message = "批次状态不能为空")
    @ApiModelProperty(value = "批次状态")
    private String batchStatus;

    @NotNull(message = "转账总金额不能为空")
    @ApiModelProperty(value = "转账总金额(分)")
    private Integer totalAmount;

    @NotNull(message = "转账总笔数不能为空")
    @ApiModelProperty(value = "转账总笔数")
    private Integer totalNum;

    @ApiModelProperty(value = "成功金额(分)")
    private Integer successAmount;

    @ApiModelProperty(value = "成功笔数")
    private Integer successNum;

    @ApiModelProperty(value = "产品码")
    private String productCode;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ApiModelProperty(value = "更新人")
    private String updateBy;

    @ApiModelProperty(value = "扩展信息")
    private String extInfo;
}
